home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / dmake / buffer.c next >
C/C++ Source or Header  |  1997-09-09  |  602b  |  36 lines

  1. /*
  2.  *    (c)Copyright 1992-1997 Obvious Implementations Corp.  Redistribution and
  3.  *    use is allowed under the terms of the DICE-LICENSE FILE,
  4.  *    DICE-LICENSE.TXT.
  5.  */
  6.  
  7. /*
  8.  *
  9.  */
  10.  
  11. #include "defs.h"
  12.  
  13. Prototype char *AllocPathBuffer(void);
  14. Prototype void FreePathBuffer(char *);
  15.  
  16.  
  17. List PathBufList = { (Node *)&PathBufList.lh_Tail, NULL, (Node *)&PathBufList.lh_Head };
  18.  
  19. char *
  20. AllocPathBuffer()
  21. {
  22.     Node *node;
  23.  
  24.     if ((node = RemHead(&PathBufList)) == NULL)
  25.     node = malloc(PBUFSIZE);
  26.     return((char *)node);
  27. }
  28.  
  29. void
  30. FreePathBuffer(buf)
  31. char *buf;
  32. {
  33.     AddTail(&PathBufList, (Node *)buf);
  34. }
  35.  
  36.